<!--
 * @Author: your name
 * @Date: 2021-05-24 15:06:40
 * @LastEditTime: 2021-05-25 22:41:54
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \遵义报名\zunyi\src\views\signUp\signUp.vue
-->
<template>
<div class="signup page">
    <!-- 导航条 -->
    <nav-bar></nav-bar>

    
    <div class="container">
      <!-- 表格 -->
      <infomation
        class="table"
        :tableData="tableData"
        :propArray="[
          { prop: 'date', lable: '考试时间' },
          { prop: 'sponsor', lable: '主办单位' },
          { prop: 'testName', lable: '考试名称' },
        ]"
      >
        <template v-slot="{ data, idx }">
          <button @click="handler(data, idx)">按钮</button>
          <button @click="edit(data, idx)">编辑</button>
        </template>
      </infomation>
    

    <!-- 分页 -->
    <pagination :total="100" v-model="currentPage"></pagination>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [
        {
          date: "2022-01-31",
          sponsor: "信息网络中心",
          testName: "无线wifi",
        },
        {
          date: "2022-01-31",
          sponsor: "信息网络中心",
          testName: "无线wifi",
        },
        {
          date: "2022-01-31",
          sponsor: "信息网络中心",
          testName: "无线wifi",
        },
      ],
      currentPage:1
    };
  },
  methods: {
    handler(data, idx) {
      console.log(data);
      console.log(idx);
    },
    edit(data, idx) {
      console.log(data);
      console.log(idx);
    },
  },
};
</script>

<style>

</style>